package test;

import weka.knowledgeflow.JSONFlowUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test20210419question4 {

    public String replaceAllTest(String str, String target,String replacement){
        return Pattern.compile(target).matcher(str).replaceAll(replacement);

    }

    public static void main(String[] args) {
        String s1 ="123";
        new Test20210419question4().replaceAllTest("123", "1","2");
    }
}
